import service from "../utils/request";

/**
 * @description: 重点单位、总侦测数据
 * @param {*} data
 * @return {*}
 */
export function comfindAllDrone (data) {
  return service({
    url: "/driver/findAllDrone",
    method: "POST",
    data,
  });
}
/**
 * @description: 重点单位、月无人机侦测数据
 * @param {*} data
 * @return {*}
 */
export function comgetDroneMonth (data) {
  return service({
    url: "/driver/getDroneMonth",
    method: "POST",
    data,
  });
}
/**
 * @description: 重点单位、今日无人机侦测数据
 * @param {*} data
 * @return {*}
 */
export function comgetDroneToday (data) {
  return service({
    url: "/driver/getDroneToday",
    method: "POST",
    data,
  });
}
/**
 * @description: 重点单位、年无人机侦测数据
 * @param {*} data
 * @return {*}
 */
export function comgetDroneYear (data) {
  return service({
    url: "/driver/getDroneYear",
    method: "POST",
    data,
  });
}
/**
 * @description: 重点单位、防御圈统计
 * @param {*} data
 * @return {*}
 */
export function comqueryStatistics (data) {
  return service({
    url: "/driver/queryStatistics",
    method: "POST",
    data,
  });
}
/**
 * @description: 重点单位、无人机品牌统计
 * @param {*} data
 * @return {*}
 */
export function comdroneBrandCount (data) {
  return service({
    url: "/driver/droneBrandCount",
    method: "POST",
    data,
  });
}
/**
 * @description: 重点单位、各时间段无人机架次统计
 * @param {*} data
 * @return {*}
 */
export function comcheckTimes (data) {
  return service({
    url: "/driver/checkTimes",
    method: "POST",
    data,
  });
}
//态势统计相关接口
/**
 * @description: 动态查询无人机、重点节假日架次
 * @param {*} data
 * @return {*}
 */
export function droneHolidayCheck (data) {
  return service({
    url: "/driver/droneHolidayCheck",
    method: "POST",
    data,
  });
}
/**
 * @description: 动态查询无人机、月架次
 * @param {*} data
 * @return {*}
 */
export function droneMonthCheck (data) {
  return service({
    url: "/driver/droneMonthCheck",
    method: "POST",
    data,
  });
}
/**
 * @description: 动态查询无人机、一周内架次
 * @param {*} data
 * @return {*}
 */
export function droneWeekCheck (data) {
  return service({
    url: "/driver/droneWeekCheck",
    method: "POST",
    data,
  });
}
/**
 * @description: 动态查询、每年无人机架次
 * @param {*} data
 * @return {*}
 */
export function droneYearCheck (data) {
  return service({
    url: "/driver/droneYearCheck",
    method: "POST",
    data,
  });
}

//今日动态
/**
 * @description: 重点单位、各时间段无人机架次统计
 * @param {*} data
 * @return {*}
 */
export function curcheckTimes (data) {
  return service({
    url: "/currentDay/checkTimes",
    method: "POST",
    data,
  });
}
/**
 * @description: 重点单位、无人机品牌统计
 * @param {*} data
 * @return {*}
 */
export function curdroneBrandCount (data) {
  return service({
    url: "/currentDay/droneBrandCount",
    method: "POST",
    data,
  });
}
/**
 * @description: 重点单位、今日无人机侦测数据
 * @param {*} data
 * @return {*}
 */
export function curgetDroneToday (data) {
  return service({
    url: "/currentDay/getDroneToday",
    method: "POST",
    data,
  });
}
/**
 * @description: 今日的、昨日的、去年今日侦测数据
 * @param {*} data
 * @return {*}
 */
export function curgetStatisticsToday (data) {
  return service({
    url: "/currentDay/getStatisticsToday",
    method: "POST",
    data,
  });
}
//历史回放
/**
 * @description:无人机历史回放列表
 * @return {data}
 */
export function comdetect (data) {
  return service({
    url: "/historyRecord/detect",
    method: "POST",
    data,
  });
}
/**
 * @description:历史回放-无人机历史轨迹
 * @return {params}
 */
export function comdetail (params) {
  return service({
    url: "/historyRecord/detail",
    method: "POST",
    params,
  });
}
//无人机注册  白名单无人机相关接口
/**
 * @description:白名单无人机注册
 * @return {data}
 */
export function comdroneRegister (data) {
  return service({
    url: "/whiteLineDrone/droneRegister",
    method: "POST",
    data,
  });
}
/**
 * @description:白名单无人机修改
 * @return {data}
 */
export function comListDrone (data) {
  return service({
    url: "/whiteLineDrone/editWhiteListDrone",
    method: "POST",
    data,
  });
}
/**
 * @description: 白名单无人机删除
 * @param {*} params
 * @return {params}
 */
export function comdeleteDrone (params) {
  return service({
    url: "/whiteLineDrone/deleteWhitelistDrone",
    method: "DELETE",
    params,
  });
}
/**
 * @description:分页展示白名单无人机
 * @return {data}
 */
export function comqueryDroneByPage (data) {
  return service({
    url: "/whiteLineDrone/queryDroneByPage",
    method: "POST",
    data,
  });
}
/**
 * @description: 无人机品牌
 * @return {*}
 */
export function comdroneBrand () {
  return service({
    url: "/admin/dictionary/droneBrand",
    method: "GET",
  });
}
/**
 * @description: 设备经纬度
 * @return {*}
 */
export function getDeviceLoc (params) {
  return service({
    url: "/civilPlatform-device/getDeviceLoc",
    method: "GET",
    params,
  });
}
/**
 * @description: 无人机型号
 * @param {*} params
 */
export function comdroneModel (params) {
  return service({
    url: "/admin/dictionary/droneModel",
    method: "GET",
    params,
  });
}
//人员管理接口
/**
 * @description: 重点单位人员信息展示
 * @param {*} params
 */
export function company_people_get (params) {
  return service({
    url: "/company/people/get",
    method: "GET",
    params,
  });
}
/**
 * @description:插入重点单位人员信息
 * @return {data}
 */
export function company_people_save (data) {
  return service({
    url: "/company/people/save",
    method: "POST",
    data,
  });
}
/**
 * @description: 删除重点单位人员信息
 * @param {*} params
 */
export function company_people_delete (params) {
  return service({
    url: "/company/people/delete",
    method: "DELETE",
    params,
  });
}
//设备相关接口
/**
 * @description:设备无人值守开关
 * @return {data}
 */
export function comDeviceUnmannedStatus (data) {
  return service({
    url: "/civilPlatform-device/editDeviceUnmannedStatus",
    method: "POST",
    data,
  });
}
/**
 * @description:设备无人值守一键开启开关
 * @return {data}
 */
export function editBatchDeviceUnmannedStatus (data) {
  return service({
    url: "/civilPlatform-device/editBatchDeviceUnmannedStatus",
    method: "POST",
    data,
  });
}
/**
 * @description:设备无人值守一键开启开关
 * @return {data}
 */
export function closeDevice (params) {
  return service({
    url: "/civilPlatform-disposal/closeDevice",
    method: "get",
    params
  });
}
/**
 * @description: 获取设备开启信息
 */
export function deviceOpenCheckapi(data) {
  return service({
    url: "/civilPlatform-disposal/deviceOpenCheck",
    method: "POST",
    data,
  });
}
/**
 * @description: 驾驶舱设备位置信息展示
 * @param {*} params
 */
export function comDevicePosList (params) {
  return service({
    url: "/civilPlatform-device/getDevicePosList",
    method: "GET",
    params,
  });
}

/**
 * @description: 处置数据统计
 * @param {*} params
 */
export function countDisposalDataStatistics (params) {
  return service({
    url: "/civilPlatform-disposal/countDisposalDataStatistics",
    method: "GET",
    params,
  });
}

/**
 * @description: 获得远程设备处置记录列表
 * @param {*} data
 */
export function queryDisposalByDeviceList (data) {
  return service({
    url: "/civilPlatform-disposal/queryDisposalDeviceAndUnmannedS",
    method: "POST",
    data,
  });
}

// /**
//  * @description: 获得远程设备日志列表
//  * @param {*} data {"companyId":1 //重点单位id
//  * ,"pageNum":1,"
//  * pageSize":10}
//  */
// export function queryDeviceUnmannedList (data) {
//   return service({
//     url: "/civilPlatform-disposal/queryDisposalDeviceAndUnmannedS",
//     method: "POST",
//     data,
//   });
// }

/**
 * @description: 驾驶舱-获取定向设备的水平角
 * @param {*} data
 */
export function droneDeviceAngle (data) {
  return service({
    url: "/civilPlatform-device/deviceAngle",
    method: "POST",
    data,
  });
}

/**
 * @description: 驾驶舱-获取在飞无人机列表
 * @param {*} params
 */
export function hisDroneDirect (params) {
  return service({
    url: "/driver/hisDroneDirect",
    method: "GET",
    params,
  });
}
/**
 * @description: 今日处置数据统计
 * @param {*} params
 */
export function countTodayDisposalDataByCompanyId (params) {
  return service({
    url: "/civilPlatform-disposal/countTodayDisposalDataByCompanyId",
    method: "GET",
    params,
  });
}

/**
 * @description: 获取重点单位数据
 * @param {*} params
 */
export function getCompanyBaseInfo (params) {
  return service({
    url: "/company/getCompanyBaseInfo",
    method: "GET",
    params,
  });
}

/**
 * @description: 通过反制设备开启反制
 * @param {*} data
 */
export function insertDisposalByDevice (data) {
  return service({
    url: "/civilPlatform-disposal/insertDisposalByDevice",
    method: "POST",
    data,
  });
}

/**
 * @description:  驾驶舱-获取当前无人机前端未接收轨迹
 * @param {*} params
 */
export function hisDroneCoors (params) {
  return service({
    url: "/driver/hisDroneCoors",
    method: "GET",
    params,
  });
}

/**
 * @description: 通过无人机轨迹对设备下发处置任务
 * @param {*} data
 */
export function insertDeviceDisposalByDrone (data) {
  return service({
    url: "/civilPlatform-disposal/insertDeviceDisposalByDrone",
    method: "POST",
    data,
  });
}
/**
 * @description:  通过短信对无人机轨迹下发处置任务
 * @param {*} params
 */
export function insertSMStalkDisposalByDrone (params) {
  return service({
    url: "/civilPlatform-disposal/insertSMStalkDisposalByDrone",
    method: "GET",
    params,
  });
}

/**
 * @description: 通过无人机轨迹对钉钉下发处置任务
 * @param {*} data
 */
// export function insertDingtalkDisposalByDrone(data) {
//   return service({
//     url: "/civilPlatform-disposal/insertDingtalkDisposalByDrone",
//     method: "POST",
//     data,
//   });
// }

/**
 * @description: 查询钉钉群信息
 * @param {*} params
 */
// export function getDingTalkInfo(params) {
//   return service({
//     url: "/civilPlatform-disposal/getDingTalkInfo",
//     method: "GET",
//     params,
//   });
// }

/**
 * @description: 获取模型信息
 * @param {*} params
 */
export function getModelInfo (params) {
  return service({
    url: "/modelInfo/getModelInfo",
    method: "GET",
    params,
  });
}


/**
 * @description: 获取疑似飞手信息
 * @param {*} params {serialCode：''} //序列号
 */
export function driverInfoBySerialCode (params) {
  return service({
    url: "/historyRecord/driverInfoBySerialCode",
    method: "GET",
    params,
  });
}

/**
 * @description: 开启单个无人值守
 * @param {*} data companyId:单位ID/deviceId:设备ID/isUnmanned:开启状态
 */
export function switchUnmanned (data) {
  return service({
    url: "/civilPlatform-device/editDeviceUnmannedStatus",
    method: "POST",
    data,
  });
}
